import pytest
from selenium import webdriver
from yuekao1110.page.page import page
from time import sleep

@pytest.fixture()
def driver():
    driver=webdriver.Chrome()
    driver.maximize_window()
    driver.implicitly_wait(5)
    yield driver
    driver.close()

def test_bing(driver):
    po1=page(driver)
    po1.open_url('https://www.bing.com/')
    sleep(2)
    po1.send_shuru()
    sleep(2)
    po1.shuru_cunzai()
    sleep(1)
    po1.click_sousuo()
    sleep(3)
    print(po1.dy1())
    sleep(1)
    po1.all_title()
    sleep(6)
    # po1.click_two()
    # sleep(2)
    po1.all_title2()
    sleep(2)